import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
import 'package:flutter_app/main02.dart';

/**
 * 引入本地图片
 */
main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: Text('Flutter Demo'),
        ),
        body: HomeContent(),
      ),
    );
  }
}

class HomeContent extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Container(
        height: 200,
        child: ListView(
          scrollDirection: Axis.horizontal,
          children: [
            Container(
              width: 180.0,
              height: 180.0,
              color: Colors.deepOrange,
              child: ListView(
                children: [
                  Image.network(
                      "https://nimg.ws.126.net/?url=http%3A%2F%2Fdingyue.ws.126.net%2FnJmjx6MxgPEsfXSy6vLzqoanX5pAUVVgVVU2Avr07ABws1546655747784.jpeg&thumbnail=650x2147483647&quality=80&type=jpg"),
                  Text("我是一个文本")
                ],
              ),
            ),
            Container(
              width: 180.0,
              height: 180.0,
              color: Colors.deepPurpleAccent,
            ),
            Container(
              width: 180.0,
              height: 180.0,
              color: Colors.red,
            ),
            Container(
              width: 180.0,
              height: 180.0,
              color: Colors.orange,
            ),
            Container(
              width: 180.0,
              height: 180.0,
              color: Colors.deepOrange,
            ),
            Container(
              width: 180.0,
              height: 180.0,
              color: Colors.deepPurpleAccent,
            ),
            Container(
              width: 180.0,
              height: 180.0,
              color: Colors.red,
            ),
            Container(
              width: 180.0,
              height: 180.0,
              color: Colors.orange,
            ),
          ],
        ));
  }
}
